<#macro btnsync id title url="">
<button id="${id}" type="button" class="btn btn-info btn-sm glyphicon glyphicon-refresh">${title}</button>
<script type="text/javascript" charset="utf-8">
$(function(){
	$("#${id}").on("click",function(){
		$.messager.confirm('确认','您确认想要做${title}？',function(r){    
		    if (r){
				$.messager.progress({interval:2000});
				$.post("${url}",function(){
					$.messager.progress('close');		
				});
		    }    
		});  
	});
});
</script>
</#macro>

<#macro btnexport id title url="">
<a id="${id}" href="${url}" class="btn btn-warning btn-sm">${title}</a>
</#macro>

<#macro page>
<!DOCTYPE html>
<html>
<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" type="text/css" href="${request.contextPath}/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="${request.contextPath}/easyui/themes/bootstrap/easyui.css" />
		<link rel="stylesheet" type="text/css" href="${request.contextPath}/easyui/themes/icon.css" />
		<link rel="stylesheet" type="text/css" href="${request.contextPath}/easyui/themes/color.css" />
		<script src="${request.contextPath}/easyui/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="${request.contextPath}/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="${request.contextPath}/easyui/plugins/jquery.portal.js" type="text/javascript" charset="utf-8"></script>
		<script src="${request.contextPath}/easyui/plugins/datagrid-detailview.js" type="text/javascript" charset="utf-8"></script>
		<script src="${request.contextPath}/easyui/easyui-lang-zh_CN.js" type="text/javascript" charset="utf-8"></script>
		<script src="${request.contextPath}/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" charset="utf-8">
		$.ajaxSetup({   
	         error: function (XMLHttpRequest, textStatus, errorThrown){  
	                if(XMLHttpRequest.status==403){                    
	                    $.messager.alert('提示', '限制访问此资源或进行此操作','info');  
	                    return false;  
	                }  
	            },    
	         complete:function(XMLHttpRequest,textStatus){     
	             var sessionstatus=XMLHttpRequest.getResponseHeader("sessionstatus"); 
	                if(sessionstatus=='timeout'){	     
	                    parent.window.location.href="/login";	  
	                }     
	         }     
		});		
		</script>
</head>
<body>

	    	<#nested/>
	 
</body>
</html>
</#macro>
